package com.wuze.cloud.enums;

import lombok.Getter;


/**
 * @author: wuze
 * @description:
 * @date: 2023/02/19
 */
public enum SysStateEnum {

    CREATE(0, "创建"),
    RECYCLING(1, "回收站"),
    DELETE(2, "已删除");

    @Getter
    private Integer code;

    @Getter
    private String name;

    SysStateEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String StateOfCode(Integer code) {
        for (SysStateEnum stateEnum : values()) {
            if (stateEnum.code.equals(code)) {
                return stateEnum.name();
            }
        }
        return null;
    }

}
